function fun1({a1 = 0,b1 = 0} = {a1:1,b1:1}) {
    console.log("a1 =",a1);
    console.log("b1 =",b1);
}

// 要求给出下面参数值的传参方式
// a1 = 0,b1 = 0;
// a1 = 0,b1 = 1;
// a1 = 1,b1 = 0
// a1 = 1,b1 = 1

console.log("---------------a1 = 0,b1 = 0--------------------")
fun1({});
fun1({a:0,b:0});
fun1([]);
fun1(false);
// fun1(null)// 报错

console.log("---------------a1 = 0,b1 = 1--------------------")
fun1({b1: 1});
fun1({a1:0,b1: 1});

console.log("---------------a1 = 1,b1 = 1--------------------")
fun1(undefined);
fun1();
fun1({a1:1,b1:1})

console.log("---------------a1 = 1,b1 = 0--------------------")
fun1({a1:1,b1:0});
fun1({a1:1});